package cc.aiee.demo.springboot.controller.applepay.bean;

import java.util.Date;

import cc.aiee.core.abstracts.AbstractQuickModel;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;

@Setter
@Getter
@Accessors(chain = true)
@RequiredArgsConstructor
@NoArgsConstructor
//@ApiModel("消费接口")
@Schema(description = "消费接口")
public class UnionAppTransQuery extends AbstractQuickModel {

	private String now = DateUtil.now();
	
	@NonNull
	@Schema(description = "订单发送时间,格式:yyyyMMddHHmmss",example = "20200918140059" ,required = true)
//	@ApiModelProperty(value = "订单发送时间,格式:yyyyMMddHHmmss", required = true, example = "20200815142645")
	private String txnTime = DateUtil.format(new Date(), DatePattern.PURE_DATETIME_PATTERN);

	@NonNull
//	@ApiModelProperty(value = "订单号", required = true)
	@Schema(description = "订单号",required = true,example = "20200101000059")
	private String orderId;

	@NonNull
//	@ApiModelProperty(value = "交易金额(分)", required = true,example = "10")
	@Schema(description = "交易金额(分)",required = true)
	private String txnAmt;

	@NonNull
//	@ApiModelProperty(value = "商户号", position = 0,hidden = true)
	@Schema(description = "商户号",required = true)
	private String merId;

	@Override
	public <T> T model(T cls) {
		BeanUtil.copyProperties(this, cls, false);
		return cls;
	}

}
